<%@page import="ContentManagers.RoleManagers.AuthenticationManager"%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>

<% //employ temporary session management here
      try{
            boolean check = false;
        
            check = new AuthenticationManager().inSuchDB(1, request, response);
            
            if(check == false)
               new AuthenticationManager().redirectToProperIndex(1, request, response);
            
            else
             {
        %>
<!DOCTYPE html>
<html>
    <head>
        <link rel="stylesheet" type="text/css" href="User Interface/css/user_int.css" />
    </head>
    <body>
        
        <%@ include file="user_header.jsp" %>
        <% //Call USER header file. The header contains the links for other pages. %> 
            
       <div id ="body_wrapper">
            <% //Actual Content of the USER Purchases page starts here. %>
      
            <%@ include file="default_left_sidebar.jsp" %>
            <%@ include file="user_purchases_body.jsp" %>
                
            <% //Actual Content of the USER Purchases page ends here. %>
       </div>
        
       <%@ include file="user_footer.jsp" %>
       <% //Call USER footer file %>
    </body>
</html>


<% }
    }catch(Exception e)
        { response.sendRedirect("index.jsp");}%>